1. Field of the Invention
The present invention relates to a method for replacing a defective block with a good block when recording data on an optical disc apparatus.
1. Description of the Related Art
Recently, it is expected that a rewritable optical disc such as a digital versatile disc-random access memory (DVD-RAM) or a digital versatile disc-rewritable (DVD-RW) capable of permanently recording and storing high-quality video data and audio data will be developed and commercialized.
There is proposed a method for processing a defect contained in a recording medium of an optical disc, for example, such as the DVD-RAM, DVD-RW, etc., such that data of the optical disc can be stably stored and reproduced.
First, the standard related art method for processing a defect contained in the optical disc will be described.
FIG. 1 is a view illustrating a method for replacing a defective block with a good block when recording data in a conventional optical disc apparatus. As shown in FIG. 1, the DVD-RAM disc is divided into a lead-in area (LIA), a data area and a lead-out area (LOA). A primary spare area (PSA) is contained at the head of the data area, and a secondary spare area (SSA) is selectively contained at the tail of the data area.
The optical disc apparatus for recording and storing external input data, encodes and modulates the external input data into a record signal appropriate for recording, and then records data to the data area of the optical disc. The data is recorded based on a unit of an error correction code (ECC) block having a predetermined size. As shown in FIG. 1, where a defective area is contained in the data area, the data that would have been recorded in the defective area is instead recorded in the spare area.
Thus, where the defective area is contained in the data area of the optical disc, the optical disc apparatus replaces the defective area with the spare area. When a data playback operation is carried out, the data recorded in the spare area is read and reproduced. As a result, a data recording error can be prevented.
Next, a method for processing a defect contained in an optical disc on the basis of a related art DVD-RAM system will be described in detail.
The DVD-RAM system processes defects by using defect management areas (DMAs) on the DVD-RAM disc. Four DMAs contain information on the structure of the data area and on the defect management. A method of managing defects in the DVD-RAM disc will be described on the basis of the structure of the data area, algorithms of managing defects and a system operation.
First, the data area structure of the optical disc will be described with reference to FIG. 2.
In the DVD-RAM, an information area is divided into a lead-in area, a data area and a lead-out area. The data area consists of a user area and spare areas and is divided into 35 zones including Zones 0 to 34. Sectors of the user area are numbered with logical sector numbers (LSNs). The spare areas include a primary spare area (PSA) and a secondary spare area (SSA). The disc shall have one primary spare area in Zone 0 and may have one expandable secondary spare area in Zone 34.
There are four DMAs per side on a disc, and two of the DMAs, DMA 1 and DMA 2, shall be located near the inner diameter of the disc and the other two, DMA 3 and DMA 4, shall be located near the outer diameter of the disc. The contents of the four DMAs shall be identical. The first ECC block of each DMA, called the disc definition structure/primary defect list (DDS/PDL) block, shall contain a DDS and a PDL, and the second ECC block of each DMA, called the secondary defect list (SDL) block, shall contain an SDL.
The DDS shall be recorded at the end of the formatting process, and specifies information of the formatted disc structure such as the number of zones, sector numbers of the first and last sectors of the PSA, a start LSN for each zone of Zones 0 to 34 and so on. The PDL shall contain the number of defective sectors and the entries of all defective sectors identified at formatting, and each entry shall specify the sector number of the defective sector.
Where a defective area is found while data is reproduced or recorded, the SDL shall contain entries, which contain the sector numbers of the first sectors of the defective ECC blocks, the sector numbers of the first sectors of the spare blocks which replace them, and a status of linear replacement (SLR) indicating whether a defective block has been replaced with a replacement block. Further, the SDL contains start sector number of the SSA, flags indicating the availability of spare blocks in the corresponding spare area, the number of entries in the SDL and so on. Here, “0b” in the SLR indicates that the defective block has been replaced with a spare block, and “1b” in the SLR indicates that the defective block has not been replaced.
Next, an algorithm of managing a defect will be described.
Defective sectors are handled by a slipping replacement algorithm (SRA), by a linear replacement algorithm (LRA), by a direct pointer method (DPM) or a block skipping algorithm (BSA).
First, the SRA will be described with reference to FIG. 3.
The SRA shall be applied over the whole data area if defective sectors are listed in the PDL. A defective data sector registered in the PDL shall be replaced by the first good sector before the defective sector. Each defective sector causes all data sectors located before the defective sector to be slipped toward the top of the data area by the number of the defective sectors, so sectors located in the head of the user area of the Zone 0 shall be slipped toward the PSA located before the user area of Zone 0. Referring to FIG. 3, the above-described procedure will be readily understood. An LSN is allocated to a sector as shown in FIG. 3. The sector numbers of the defective sectors are listed in the PDL, and the defective sectors shall not be used for recording user data.
Next, the LRA will be described with reference to FIG. 4.
The LRA is used to handle defective and deteriorated sectors found after formatting. These may be defective sectors which were not registered in the PDL during formatting or sectors damaged by excessive overwrite cycles. The replacement shall be performed in units of 16 sectors, i.e., a data block (one ECC block).
The defective block shall be replaced by the first available good spare block of the PSA. If there is no spare block left in the PSA, the defective block shall be replaced by the first available good spare block of the SSA if it has been allocated. The first available good spare block of the PSA is the first available good block immediately before the first replacement block registered in the SDL. If there is no replacement block listed in the SDL, then the first available good spare block of the PSA is the first good block immediately before the first data block.
If the PSA is exhausted and an SSA has been allocated, then the first available good spare block is the outermost unused good block of the SSA. Defective sectors in the spare area and the corresponding replacement sectors, which have been already registered in the PDL or SDL, shall not be used as spare sectors.
If a block to be read from or written to is listed in the SDL with an SLR of “0b”, then the data shall be read from or written to the replacement block of the spare area pointed to by the SDL. But if a block to be read from is listed in the SDL with an SLR of “1b”, then the partially corrected data or padding data of “0b” for all bits shall be returned.
Next, the DPM will be described.
If a replacement block listed in the SDL is later found to be defective, then the DPM shall be applied to changing the SDL. In this method, an SDL entry in which a defective replacement block has been registered shall be modified by changing the sector number of the first sector of the replacement block from the defective replacement block to a new one. Because the sector number of the defective replacement block is changed to the sector number of the new replacement block, the number of entries in the SDL is unchanged.
Finally, the BSA will be described.
In order to guarantee a minimum bit rate for real-time data recording and playback, real-time data should not be replaced by the LRA. In other words, the real-time data cannot be recorded in spare blocks as replacement blocks by the LRA or in the defective blocks found in the process of recording the real-time data.
If the real-time data is to be recorded in a block listed in the SDL, the data shall be skipped or shall be recorded in the next available data block. Then, the SLR should be changed to “1b” and the field of sector number of the first sector in the replacement block should be maintained. If a defective block is found while real-time data recording, then the data shall be skipped or the next available data block is used to record the data and the defective block should be listed in the SDL with an SLR of “1b”.
Now, a process of managing a defect on the basis of an operation of an optical disc system will be described. The system operation includes a disc formatting process, a data writing process and a data reading process in relation to functions of writing data to the disc and reading data from the disc.
First, the disc formatting process will be described.
A disc shall be formatted before use. Formatting is performed by either initialization or re-initialization. There is no DMA recorded on the disc before the formatting process. If there are DMAs recorded on the disc before the formatting process, then the process shall be regarded as re-initialization. After formatting the disc, the four DMAs shall be recorded. All DDS parameters shall be recorded in four DDS sectors.
The defective sectors in the user area and spare area, found during formatting, are handled by the SRA after the formatting process. So the sector number of the last sector of the PSA and the start LSN for each zone, which are determined according to the SRA, are recorded in the DDS sector, and the number of the defective sectors, and the sector numbers of the defective sectors, are recorded in the PDL sector. If the number of defective sectors to be registered in the PDL exceeds a criterion, then those defective sectors, which cannot be registered in the PDL, shall be registered in the SDL.
Next, the data writing process will be described.
When data is written, defective sector(s) listed in the PDL shall be skipped and the, data shall be written in the next sector according to the SRA. If a block to be written to is found to be defective, then the defective block may be replaced by the first available good spare block according to the LRA, or may be skipped according to the BSA. And if a block to be written to is listed in the SDL, then the block may be replaced according to the LRA, or may be skipped according to the BSA.
Finally, the data reading process will be described.
When data is read, defective sector(s) listed in the PDL shall be skipped and the data shall be read from the next sector according to the SRA. If a data block to be read is listed in the SDL with an SLR of “0b”, then the data shall be read from a replacement block in the spare area pointed by the SDL according to the LRA. But if a data block to be read from is listed in the SDL with an SLR of “1b”, then the partially corrected data or padding data of “0b” for all bits shall be returned. If a block to be read from is found to be defective and correctable, then the defective block may be replaced by the first available good spare block according to the LRA.
Problems when data is recorded using the conventional defect processing method will be described.
While a predetermined length of data (e.g., data corresponding to a size of one to ten ECC blocks) is recorded in response to a recording request, errors can occur if a middle portion of the data would be recorded in a defective area of the disk. For instance, the disk may contain a defect in a user area to which the fifth data block would be recorded.
The following method is used for verifying a defect of a disc while data is recorded on a digital versatile disc-random access memory (DVD-RAM). After all items of data corresponding to the recording request are recorded in the disc, the recorded data is read back from the disk. The recording apparatus then attempts to verify that a physical ID (PID) and others are appropriately read back from the disk. If the PID and others are appropriately read, it is determined that no defect has occurred. In other words, no data was recorded in a defective portion of the disk. However, if the PID and others are not appropriately read back from the disk, it is determined that data may have been recorded in a defective sector. If a rewritable disc is inserted, the system reads and keeps DMA data from the disc.
Information associated with a position of the first sector of a defective block (to which the fifth data block was recorded), and a position of the first sector of a replacement block, are recorded in the DMA. The optical pickup is thereafter jumped to a spare area and then the fifth data block is recorded in the replacement block. The optical pickup is jumped to a position for recording corresponding data in response to the next recording request.
Where a defective block is found in an area for recording data, or a defective block is registered in the SDL while external input data is recorded, the optical pickup is moved to the spare area while a general data recording operation is suspended, the data is recorded in the replacement block, and the general data recording operation re-starts. As a result, there are problems in that a system load increases due to frequent track movements on the optical disc and hence the data recording operation is delayed.
The delays associated with moving the optical pickup to a replacement area can cause problems when attempting to record real-time video or audio data. If the optical pickup is moved to a replacement block area, in order to store real-time data that would have otherwise been recorded in a defective block, the delay can become too great, and some of the real-time data may be lost.